package com.woniuxy.redis.utils;/*
@author houguai
@create 2021-01-13 11:58
*/

import java.lang.reflect.Method;

public class RedisUtil {

    public static String generate(Object target, String methodName, Object... params) {
        StringBuilder sBuilder = new StringBuilder();
        sBuilder.append(target.getClass().getName());
        sBuilder.append(".");
        sBuilder.append(methodName);    //生成key
        if (params!=null) {
            for(Object object:params){
                sBuilder.append(".");
                sBuilder.append(object.toString());
            }
        }
        return sBuilder.toString();
    }



}
